{	Problem: http://codeforces.ru/problemset/problem/43/A
	Verdict: Accepted

}
var s:string; i,n,a,b,cur:longint; c:array[1..2] of string;
begin
readln(n);
a:=0;
b:=0;
cur:=0;
c[1]:='';
c[2]:='';
for i:=1 to n do begin
  readln(s);
  if (cur<2) and (s<>c[1]) then begin
    inc(cur);
    c[cur]:=s;
  end;
  if s=c[1] then inc(a) else inc(b);
end;
if a>b then writeln(c[1]) else writeln(c[2]);
end.